home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / dist.doc < prev    next >
Text File  |  1995-03-31  |  2KB  |  58 lines

  1. (Comp.sys.handhelds) 
  2. Item: 1069 by ebergman at isis.cs.du.edu 
  3. Author: [Eric Bergman-Terrell] 
  4.   Subj: Computing Great Circle Distance 
  5.   Date: Tue Nov 06 1990 09:48  
  6.  
  7. DIST for the HP 48SX: 
  8.  
  9. Introduction: 
  10.  
  11. This program calculates the great circle distance in statute miles  
  12. between two cities, given their latitude and longitude in degrees,  
  13. minutes, and seconds format. 
  14.  
  15. Caveats: 
  16.  
  17. No correction is made for the Earth's equatorial bulge.  USE THIS  
  18. SOFTWARE AT YOUR OWN RISK. 
  19.  
  20. Method:   
  21.  
  22. EXPRESS LATITUDES NORTH OF THE EQUATOR AS POSITIVE NUMBERS, AND 
  23. LATITUDES SOUTH OF THE EQUATOR AS NEGATIVE NUMBERS.  EXPRESS  
  24. LONGITUDES WEST OF GREENWICH AS POSITIVE NUMBERS, AND LONGITUDES 
  25. EAST OF GREENWICH AS NEGATIVE NUMBERS. 
  26.  
  27. What the program does: 
  28.  
  29. Convert the two latitudes and longitudes into spherical coordinate  
  30. unit vectors.  The smallest angle between the vectors is calculated  
  31. by taking the inverse cosine of the vectors' dot product.   
  32. Multiplying this angle by 60 yields the nautical miles between the  
  33. two cities.  Multiplying by 6080 and then dividing by 5280 yields  
  34. statute miles. 
  35.  
  36. Setup: 
  37.  
  38. YOUR CALCULATOR MUST BE IN DEGREES MODE TO RUN THE PROGRAM.  To get 
  39. into degrees mode, use the DEG command. 
  40.  
  41. Example: 
  42.  
  43. Tokyo: 35d35'00" N 139d45'00" E 
  44. Denver:     39d44'58" N 104d59'22" W 
  45.  
  46. Entering the following: 
  47.  
  48. 35.35 
  49. -139.45 
  50. 39.4422 
  51. 104.5922 
  52. DIST 
  53.  
  54. leaves 5800 on the stack.  My almanac says that Denver is 5795 
  55. statute miles from Tokyo. 
  56.  
  57. Eric Bergman-Terrell 
  58.